<?php
/**
 * 会员中心--积分列表
 *
 * @copyright  Copyright (c) 2007-2013 ShopNC Inc. (http://www.shopnc.net)
 * @license    http://www.shopnc.net
 * @link       http://www.shopnc.net
 * @since      File available since Release v1.1
 */
defined('InShopNC') or exit('Access Invalid!');

class member_pointsControl extends MobileControl{
    public function __construct(){
        parent::__construct();
        $this->isLogin();
    }
    /*
     * 会员积分列表
     * */
    public function indexOp() {
        $this->points_logOp ();
        exit ();
    }

    /**
     * 积分日志列表
     */
    public function points_logOp() {
        $condition_arr = array ();
        $condition_arr ['pl_memberid'] = $_SESSION ['member_id'];
        if ($_GET ['stage']) {
            $condition_arr ['pl_stage'] = $_GET ['stage'];
        }
        // 分页
        $page = new Page ();
        $page->setEachNum ( 20 );
        $page->setStyle ( 'admin' );
        // 查询积分日志列表
        $points_model = new pointsModel ();
        $list_log = $points_model->getPointsLogList ( $condition_arr, $page, '*');
        // 查询会员信息
        $this->get_member_info();
        $this->_assignMobileData($page);
        Tpl::output ( 'list_log', $list_log );
        Tpl::showpage ( 'member_points' );
    }
}